﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="RoomAvailability.aspx.cs" Inherits="SWEN_HMS.BookingModule.RoomAvailiability" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .auto-style2
        {
            width: 100%;
        }
        .auto-style4
        {
            height: 25px;
            text-align: right;
        }
        .auto-style5
        {
            text-align: right;
        }
    </style>
</asp:Content>
<asp:Content ID="Content6" runat="server" contentplaceholderid="ContentPlaceHolder1">
        <asp:Panel ID="Panel1" runat="server" CssClass="newStyle1">
            <br />
            <asp:Panel ID="Panel3" runat="server" ForeColor="Black" GroupingText="Room Layout" ScrollBars="Horizontal" Width="795px">
                <table class="auto-style2">
                    <tr>
                        <td bgcolor="#FFFFCC" class="auto-style4">
                            Available
                            <asp:TextBox ID="TextBox5" runat="server" BackColor="#99FF99" Enabled="False" Height="12px" Width="25px"></asp:TextBox>
                            &nbsp;Occupied
                            <asp:TextBox ID="TextBox6" runat="server" BackColor="Red" Enabled="False" Height="12px" Width="25px"></asp:TextBox>
                            Cleaning
                            <asp:TextBox ID="TextBox7" runat="server" BackColor="#00CCFF" Enabled="False" Height="12px" Width="25px"></asp:TextBox>
                        </td>
                    </tr>
                </table>
                <div class="auto-style5">
                    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:SWENdbConnectionString %>" SelectCommand="SELECT [roomNo], [roomStatus] FROM [Room]"></asp:SqlDataSource>
                    <asp:Button ID="checkIn" runat="server" CssClass="btnCSS" OnClick="checkIn_Click" Text="Check In" />
                    <asp:Button ID="checkOut" runat="server" CssClass="btnCSS" OnClick="checkOut_Click" Text="Check Out" />
                    <asp:Button ID="request" runat="server" CssClass="btnCSS" OnClick="request_Click" Text="Request" />
                    <asp:Button ID="cleaning" runat="server" CssClass="btnCSS" Text="Cleaning Done" OnClick="cleaning_Click" />
                    <br />
                    <br />
                    Selected Room: <strong>
                    <asp:Label ID="Label2" runat="server"></asp:Label>
                    </strong>
                    <br />
                    <asp:Panel ID="Panel4" runat="server" BackColor="#FFFFCC">
                        <div class="alignAssist">
                            <center>
                                <asp:DataList ID="DataList1" runat="server" BackColor="#FFFFCC" CellPadding="0" DataKeyField="roomNo" DataSourceID="SqlDataSource1" OnSelectedIndexChanged="DataList1_SelectedIndexChanged" RepeatColumns="10" RepeatDirection="Horizontal" ShowFooter="False" ShowHeader="False" Width="423px">
                                    <HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="True" />
                                    <ItemTemplate>
                                        <asp:Button ID="Button2" runat="server" BackColor='<%# Convert.ToString(Eval("roomStatus")) == "Cleaning"? System.Drawing.ColorTranslator.FromHtml("#00CCFF"):Convert.ToString(Eval("roomStatus")) == "Occupied"? System.Drawing.Color.Red:System.Drawing.ColorTranslator.FromHtml("#99FF99") %>' CommandName="Select" Width="20px" />
                                        <br />
                                        <asp:Label ID="Label1" runat="server" Font-Size="10pt" Text='<%# Eval("roomNo") %>'></asp:Label>
                                        <br />
                                    </ItemTemplate>
                                </asp:DataList>
                            </center>
                        </div>
                    </asp:Panel>
                    <br />
                    <br />
                </div>
                <br />
            </asp:Panel>
            <br />
        </asp:Panel>
    </asp:Content>
<asp:Content ID="Content7" runat="server" contentplaceholderid="pageTitlePHolder">
    <span class="auto-style1" style="color: #000000">Room Status</span> 
</asp:Content>

